package com.icloud.common.database.enums;

import lombok.Getter;

@Getter
public enum CryptoCurrencyEnum {
    //USDT_TRC20("USDT_TRC20"), // 波场
    //USDT_ERC20("USDT_ERC20"), // 以太
    BCPC_BEP20("BCPC_BEP20"); // 币安
    private final String code;

    CryptoCurrencyEnum(String code){
        this.code = code;
    }

    public static CryptoCurrencyEnum byCode(String code) {
        for (CryptoCurrencyEnum e: CryptoCurrencyEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }

    public static boolean isBEP20(String code){
        return BCPC_BEP20.code.equalsIgnoreCase(code);
    }
}
